package java2022_07_12;

import java.io.File;
import java.io.IOException;

public class FileDemo8 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        File file1 = new File("./out/test.txt");
        //renameTo方法不仅可以进行文件重命名，也可以进行文件移动
        file1.renameTo(file);
    }
}
